package com.opener.web.model.common;


import com.opener.common.model.Model;

/**
 *
 * @author baboy
 * @date 20/12/2016
 */
public class SearchArgs extends Model {
    private static final long serialVersionUID = 9163773941618629079L;
    public static final String SORT_ASC = "asc";
    public static final String SORT_DESC = "desc";

    private Integer offset = 0;
    private Integer pageSize = 10;
    private String keyword;
    private String orderBy;
    private String sort;

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        if (offset == null){
            offset = 0;
        }
        this.offset = offset;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        if (pageSize == null){
            pageSize = 0;
        }
        this.pageSize = pageSize;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }
}
